#!/bin/bash

set -u

MGRHOST=bl460c-14.test	# Where to send the trap
COMMSTR=public		# community string
TRAPTYPE=6		# enterprise-specific; other vals are 0-5, see web
ENT=hp			# enterprise for which SPECIFIC makes sense
AGENT=`hostname`	# On whose behalf is this trap being sent
SPECIFIC=5003		# trap type
UPTIME=""		# blank will force a lookup
# Just add one varbind for some flavor
# VAR1=hpIpfEvtDetailStr.0
# oid OID_hpIpfEvtDetailStr[] = { SNMP_OID_ENTERPRISES, 11, 2, 23, 35, 1, 0 };
# 1.3.6.1.4.1.11 - Hewlett-Packard Company
VAR1=.1.3.6.1.4.1.11.2.23.35.1.0.0

TYPE1=s
VAL1="The BMC has died dude, go home"

# snmptrap -v 1 -c public -m ALL lpipmi.rocky hp either-p0.test 6 5003 ""

snmptrap -v 1 -c $COMMSTR -m ALL $MGRHOST $ENT $AGENT $TRAPTYPE $SPECIFIC \
	"$UPTIME" $VAR1 $TYPE1 "$VAL1"



